﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Model;
using Db;

namespace Controller
{
    public class SaleCtr
    {
        SaleDb saledb = new SaleDb();
        public Sale GetSaleByID(int id)
        {
            return saledb.GetSaleByID(id);
        }

        public List<Sale> GetAllSales()
        {
            return saledb.GetAllSales();
        }

        public void InsertSale(Sale sale)
        {
            saledb.InsertSale(sale);
        }

        public void PaySale(Sale sale)
        {
            saledb.PaySale(sale);
        }

        public List<Sale> GetAllNotPaidSales()
        {
            return saledb.GetAllNotPaidSales();
        }

        public List<Sale> GetAllPaidSales()
        {
            return saledb.GetAllPaidSales();
        }

        public void DeleteSale(int id)
        {
            saledb.DeleteSaleByID(id);
        }
    }
}
